<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/include/taglibs.jsp" %>
<html>
<head>
    <%@include file="/include/header.html" %>
    <script type="text/javascript" src="${ctx}/appjs/sms/tenantSms.js"></script>
</head>

<script type="text/javascript">
    $('#topLink', window.parent.document).html(function (i, origText) {
        return '<ol class="breadcrumb">' +
            '<li class="breadcrumb-item">' +
            '<a href="">云产品</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a>短信管理</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<strong>短信记录</strong>' +
            '</li>' +
            '</ol>';
    });

    var has_add = 'hidden';
    var has_edit = 'hidden';
    var has_delete = 'hidden';
</script>

<%--<div shiro:hasPermission="sys:menu:add">--%>
<script type="text/javascript">
    has_add = '';
</script>
<%--</div>--%>
<%--<div shiro:hasPermission="sys:user:edit">--%>
<script type="text/javascript">
    has_edit = '';
</script>
<%--</div>--%>
<%--<div shiro:hasPermission="sys:user:remove">--%>
<script type="text/javascript">
    var has_delete = '';
</script>
<%--</div>--%>

<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="col-sm-12">
        <div class="ibox">
            <div class="ibox-body">
                <div class="row">

                    <div class="pull-left search col-md-3">
                        <row>
                            <label class="col-md-12" style="width: auto;padding-left: 0">运营商</label>
                            <input id="tenantCode" name="tenantCode" style="display:block" readonly type="text"
                                   class="form-control col-md-6"
                                   placeholder="运营商">
                            <input id="beginTime" name="beginTime" type="text" class="form-control"
                                   placeholder="开始时间">
                        </row>
                    </div>
                    <div class="pull-left search col-md-3">
                        <row>
                            <label class="col-sm-12" style="width: auto;padding-left: 0">短信剩余条数</label>
                            <input id="amount" name="amount" style="display:block" readonly type="text"
                                   class="form-control col-md-6"
                                   placeholder="短信剩余条数">
                            <input id="endTime" name="endTime" type="text" class="form-control"
                                   placeholder="结束时间">
                        </row>
                    </div>
                    <div class="pull-left search col-md-3">
                        <row>
                            <label class="col-sm-12" style="width: auto;padding-left: 0">已发送条数</label>
                            <input id="usedAmout" name="usedAmout" style="display: block" readonly type="text"
                                   class="form-control col-md-6"
                                   placeholder="已发送条数">
                            <input id="count" name="count" type="text" class="form-control"
                                   placeholder="导出条数">
                        </row>
                    </div>
                    <div class="pull-left search col-md-3">
                        <row>
                            <label class="col-sm-12" style="width: auto;padding-left: 0">统一单价</label>
                            <input id="unitPrice" name="unitPrice" style="display:block" readonly type="text"
                                   class="form-control col-md-6"
                                   placeholder="统一单价">
                            <div class="pull-left search col-md-2">
                                <button class="btn btn-success" onclick="tenantSms.reLoad()">查询</button>
                            </div>
                            <div class="pull-left search col-md-2">
                                <button class="btn btn-success exportBtn" onclick="tenantSms.exportSmsRecord()">导出</button>
                            </div>
                        </row>
                    </div>
                </div>
            </div>
        </div>

        <table id="exampleTable" data-mobile-responsive="true">
        </table>
    </div>
</div>
</div>
</div>
<script type="text/javascript">
    layui.use('laydate', function () {
        var laydate = layui.laydate;
        var beginTime = laydate.render({
            elem: '#beginTime',
            type: 'datetime',
            format: 'yyyy-MM-dd HH:mm:ss',
            trigger: 'click',
            done: function (value, dates) {
                endTime.config.min = {
                    year: dates.year,
                    month: dates.month - 1, //关键
                    date: dates.date,
                    hours: 0,
                    minutes: 0,
                    seconds: 0
                };
            }
        });
        var endTime = laydate.render({
            elem: '#endTime',
            type: 'datetime',
            format: 'yyyy-MM-dd HH:mm:ss',
            trigger: 'click'
        });

    });

    tenantSms.init();
</script>
</body>
</html>
